package com.gxc.dao.impl;

import com.gxc.dao.OrderItemDao;
import com.gxc.pojo.OrderItem;

/**
 * @Classname OrderItemDaoImpl
 * @Description TODO
 * @Date 2020/11/20 17:15
 * @author by 97830
 */
public class OrderItemDaoImpl extends BaseDao implements OrderItemDao {
    @Override
    public int saveOrderItem(OrderItem orderItem) {
        String sql = "insert into t_order_item(`name`,`count`,`price`,`total_price`,`order_id`) values(?,?,?,?,?)";

        return update(sql, orderItem.getName(),orderItem.getCount(),orderItem.getPrice(),orderItem.getTotalPrice(),orderItem.getOrderId());
    }
}